# -*- coding: utf-8 -*-
# @Time    : 2020/2/6 12:55
# @Author  : Weymouth
# @Email   : 261229090@qq.com
# @File    : 高阶函数.py
# @Software: PyCharm
# ---------------------------------------------------

def f(n):
    return n*n

def foo(a, b, func):
    func(a) + func(b)
    ret = func(a)+func(b)
    return ret
foo(1, 2, f)
print(foo(1, 2, f))